
def solve(vlist,wlist,totalWeight,totalLength):
    resArr = [[0 for _ in range(totalWeight+1)] for _ in range(totalLength+1)]
    for i in range(1,totalLength+1):
        for j in range(1,totalWeight+1):
            if wlist[i] <= j:
                resArr[i][j] = max(resArr[i-1][j-wlist[i]]+vlist[i], resArr[i-1][j])
            else:
                resArr[i][j] = resArr[i-1][j]
    return resArr[-1][-1]

def reverseStr(ls):
    ss = list(ls)
    s, e = 0, len(ss)-1
    while s < e:
        ss[s], ss[e] = ss[e], ss[s]
        s += 1
        e -= 1
    return ss

print(reverseStr("sadgsadjasdaashkjh"))